package com.edu.buservice.biz.enums;


import lombok.Getter;

@Getter
public enum DomainEnum {

	//用户端
	USER("user", "用户端"),

	//商户端
	MERCHANT("merchant", "商户端"),

	//管理员端
	ADMIN("admin", "管理员端");

	private final String domain;

	private final String desc;

	DomainEnum(String domain, String desc) {
		this.domain = domain;
		this.desc = desc;
	}

	public static DomainEnum getByDomain(String domain) {
		for (DomainEnum domainEnum : values()) {
			if (domainEnum.getDomain().equals(domain)) {
				return domainEnum;
			}
		}
		return null;
	}



}
